package org.flexthinker.binding.validation
{
    import org.flexthinker.binding.value.PropertyChangePublisher;

    public interface ValidationResultsModel extends ValidationResults
    {
        /**
         * Adds a listener that will be notified when there is any change to the set
         * of validation messages.
         */
        function addValidationListener( listener : ValidationListener ):void;

        /**
         * Removes the provided validation listener.
         */
        function removeValidationListener( listener:ValidationListener):void;

        /**
         * Adds a listener that will be notified when there is any change to the set
         * validation messages for the specified property.
         */
        function addValidationListenerForProperty( propertyName:String, listener:ValidationListener):void;

        /**
         * Removes the provided validation listener.
         */
        function removeValidationListenerForProperty( propertyName:String, listener:ValidationListener):void;

        /**
         * Add a validationResultsModel as a child to this one. Results originating
         * from child models have to be taken into account by the parent.
         *
         * @param validationResultsModel
         */
        //function add( validationResultsModel:ValidationResultsModel):void;

        /**
         * Remove the given validationResultsModel from the list of children.
         *
         * @param validationResultsModel
         */
        //function remove( validationResultsModel:ValidationResultsModel):void;
    }
}